package Sql;

import java.sql.Date;

/**
 * 
 * 这是个货物信息类
 *
 */

public class Goods {

	private String gid;
	private String gname;
	private String unit;
	private int num;
	private String cid;
	private String cname;
	private int minnum;
	private int maxnum;
	private float price;
	private Date createtime;
	private String savetime;
	private String others;
	
	

	public Goods(String gid, String gname, String unit, int num, String cid,
			String cname, int minnum, int maxnum, float price, Date createtime,
			String savetime, String others) {
		super();
		this.gid = gid;
		this.gname = gname;
		this.unit = unit;
		this.num = num;
		this.cid = cid;
		this.cname = cname;
		this.minnum = minnum;
		this.maxnum = maxnum;
		this.price = price;
		this.createtime = createtime;
		this.savetime = savetime;
		this.others = others;
	}
	

	public Goods(String gid, String gname, String unit, int num, String cid,
			 int minnum, int maxnum) {
		super();
		this.gid = gid;
		this.gname = gname;
		this.unit = unit;
		this.num = num;
		this.cid = cid;
		this.minnum = minnum;
		this.maxnum = maxnum;
	}
	
	public Goods(){}


	public String getGid() {
		return gid;
	}


	public void setGid(String gid) {
		this.gid = gid;
	}


	public String getGname() {
		return gname;
	}


	public void setGname(String gname) {
		this.gname = gname;
	}


	public String getUnit() {
		return unit;
	}


	public void setUnit(String unit) {
		this.unit = unit;
	}


	public int getNum() {
		return num;
	}


	public void setNum(int num) {
		this.num = num;
	}


	public String getCid() {
		return cid;
	}


	public void setCid(String cid) {
		this.cid = cid;
	}


	public String getCname() {
		return cname;
	}


	public void setCname(String cname) {
		this.cname = cname;
	}


	public int getMinnum() {
		return minnum;
	}


	public void setMinnum(int minnum) {
		this.minnum = minnum;
	}


	public int getMaxnum() {
		return maxnum;
	}


	public void setMaxnum(int maxnum) {
		this.maxnum = maxnum;
	}


	public float getPrice() {
		return price;
	}


	public void setPrice(float price) {
		this.price = price;
	}


	public Date getCreatetime() {
		return createtime;
	}


	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}


	public String getSavetime() {
		return savetime;
	}


	public void setSavetime(String savetime) {
		this.savetime = savetime;
	}


	public String getOthers() {
		return others;
	}


	public void setOthers(String others) {
		this.others = others;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((gid == null) ? 0 : gid.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Goods other = (Goods) obj;
		if (gid == null) {
			if (other.gid != null)
				return false;
		} else if (!gid.equals(other.gid))
			return false;
		return true;
	}


	@Override
	public String toString() {
		return "Goods [gid=" + gid + ", gname=" + gname + ", unit=" + unit
				+ ", num=" + num + ", cid=" + cid + ", cname=" + cname
				+ ", minnum=" + minnum + ", maxnum=" + maxnum + ", price="
				+ price + ", createtime=" + createtime + ", savetime="
				+ savetime + ", others=" + others + "]\n";
	};

	
}

